/**
 * 
 */
package view;

import java.awt.Font;

import javax.swing.JRadioButton;

import model.core.utente.Studente;

/**
 * @author Giuseppe Fusco (fusgius@gmail.com)
 *
 */
public class GiocatoreToggleButton extends JRadioButton {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4743904831207635653L;
	private Studente studente;
	private boolean stateAdded;
	
	public GiocatoreToggleButton(Studente s){
		this.studente = s;
		setText(studente.getMatricola());
		setHorizontalAlignment(CENTER);
		setVerticalAlignment(BOTTOM);
		setToolTipText(s.getNome()+"   "+s.getCognome());
		setFont(new Font("Trebuchet MS", 1, 14));
		stateAdded = false;
	}
	
	/**
	 * @return the stateAdded
	 */
	public boolean isStateAdded() {
		return stateAdded;
	}
	
	/**
	 * @param stateAdded the stateAdded to set
	 */
	public void setStateAdded(boolean stateAdded) {
		this.stateAdded = stateAdded;
	}
	
	public Studente getStudente() {
		return studente;
	}
	
	public void setStudente(Studente studente) {
		this.studente = studente;
	}
	
	/* (non-Javadoc)
	 * @see javax.swing.AbstractButton#doClick()
	 */
	@Override
	public void doClick() {
		// TODO Auto-generated method stub
		super.doClick();
	}
}
